package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.entity.PmsCategoryEntity;
import com.atguigu.gulimall.product.vo.web.Catalog2Vo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author yaotingkun
 * @email 1371364676@qq.com
 * @date 2021-10-13 14:21:50
 */
public interface PmsCategoryService extends IService<PmsCategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 三级分类
     */
    List<PmsCategoryEntity> listWithTree();

    /**
     * 检查当前删除菜单是否被其它地方引用
     */
    void removeMenuByIds(List<Long> asList);

    /**
     * 找到catelogid路径
     */
    Long[] findCatelogPath(Long catelogId);

    void updateCascade(PmsCategoryEntity category);


    /**** Web 端接口调用 ****/
    /**
     * 获取首页一级分类信息
     */
    List<PmsCategoryEntity> getTopCategory();

    /**
     * 获取分类树菜单
     */
    Map<String, List<Catalog2Vo>> listCategoryTree();
}

